var app = angular.module('ZJPC');

app.controller('WifiDetailController', ['$scope', '$state','$uibModalInstance', '$http', 'DataService','data', function($scope, $state, $uibModalInstance, $http, DataService,data) {

    $scope.showLoading = true;
	console.log(data)
	$scope.cancel = function() {
      $uibModalInstance.dismiss('cancel');
    };

    DataService.getWifiByLsh(data.lsh,callback)

    $scope.xm = data.xm;
    function callback(result){
        $scope.showLoading = false;
        console.log(result)
    	$scope.data = result;
    }

    $scope.baseInfo = function(){
		var url = $state.href('app.file.perfile.basic',{xm:$scope.data.xm,jid:$scope.data.xhgh});
	  	window.open(url,'_blank');
	}

}]);
